<template>
  <section class="QuickCardList__container">
    <div>
      <slot name="action-bar" />
    </div>
    <div v-if="items && items.length > 0" class="card-list">
      <quick-card v-for="item in items" :key="item.id">
        <slot :item="item" />
      </quick-card>
    </div>
    <div v-else class="empty">
      <i class="iconfont icon-meiyoushuju nodata"></i>
      暂无数据
    </div>
  </section>
</template>

<script>
export default {
  components: {},
  props: {
    items: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {
      loading: false,
    };
  },
  methods: {},
  mounted() {},
};
</script>

<style scoped lang="scss">
.QuickCardList__container {
  height: 100%;

  .card-list {
    display: flex;
    flex-flow: wrap;
    align-content: flex-start;
    padding: 10px;
  }

  .empty {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    color: #c9c9c9;

    .nodata {
      font-size: 5rem;
      margin-bottom: 20px;
    }
  }
}
</style>